<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>找回密码 - 账户管理</title>
    <!-- 引入外部资源 -->
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <!-- 引入自定义样式 -->
    <link rel="stylesheet" href="forgot-password.css">
    <!-- 配置Tailwind -->
    <script src="forgot-password-config.js"></script>
</head>
<body>
    <div class="container mx-auto px-4 py-12 max-w-4xl">
        <div class="flex flex-col md:flex-row gap-8">
            <!-- 左侧说明 -->
            <div class="md:w-1/2">
                <h1 class="text-3xl font-bold mb-4">找回密码</h1>
                <p class="text-gray-600 mb-6">请输入您注册时使用的邮箱或用户名，我们将发送密码重置链接到您的邮箱</p>
                
                <div class="bg-blue-50 p-4 rounded-lg mb-6">
                    <h3 class="font-medium text-blue-800 mb-2">无法收到邮件？</h3>
                    <ul class="list-disc pl-5 text-blue-700 text-sm space-y-1">
                        <li>检查垃圾邮件文件夹</li>
                        <li>确认您输入的邮箱正确</li>
                        <li>如果问题持续，请联系客服</li>
                    </ul>
                </div>
            </div>
            
            <!-- 右侧表单 -->
            <div class="md:w-1/2 bg-white rounded-xl shadow-sm p-6 md:p-8">
                <form id="forgot-password-form" class="space-y-5">
                    <div>
                        <label for="user-identifier" class="block text-sm font-medium text-gray-700 mb-1">邮箱或用户名</label>
                        <div class="relative">
                            <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-400">
                                <i class="fa fa-user"></i>
                            </span>
                            <input type="text" id="user-identifier" 
                                   class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-300 focus:ring-2 focus:ring-primary/50 focus:border-primary outline-none transition-custom"
                                   placeholder="请输入您的邮箱或用户名" required>
                            <div class="error-message text-red-500 text-sm mt-1" id="user-identifier-error"></div>
                        </div>
                    </div>
                    
                    <!-- 密码重置链接显示区域 -->
                    <div id="reset-link-container" class="hidden bg-gray-50 p-4 rounded-lg border border-gray-200">
                        <h4 class="font-medium text-gray-800 mb-2">密码重置链接</h4>
                        <div class="flex items-center space-x-2">
                            <input type="text" id="reset-link" class="flex-grow bg-transparent border-none focus:ring-0 text-sm text-gray-600" readonly>
                            <button type="button" id="copy-link" class="text-primary hover:text-primary/80 text-sm transition-colors">
                                <i class="fa fa-copy mr-1"></i>复制
                            </button>
                        </div>
                        <p class="text-xs text-gray-500 mt-2">
                            该链接也已发送至您的邮箱，有效期为24小时
                        </p>
                    </div>
                    
                    <button type="submit" 
                            class="w-full bg-primary hover:bg-primary/90 text-white font-medium py-3 px-4 rounded-lg transition-custom shadow-lg shadow-primary/20 hover:shadow-xl hover:shadow-primary/30">
                        发送重置链接
                    </button>
                    
                    <div class="text-center">
                        <a href="index.html" class="text-sm text-primary hover:text-primary/80 transition-custom">
                            返回登录
                        </a>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <!-- 引入自定义脚本 -->
    <script src="forgot-password.js"></script>
</body>
</html>
